package model

// Service represents the services table
type Service struct {
	BaseModel
	Name        string        `gorm:"column:name;NOT NULL"`
	Price       float64       `gorm:"column:price;NOT NULL"` // 使用 float64 映射 DECIMAL
	Img         string        `gorm:"column:img;NOT NULL"`
	IsOnShelf   bool          `gorm:"column:isOnShelf;NOT NULL"`
	ServiceTime []ServiceTime `gorm:"foreignKey:ServiceID;references:ID"`
	Describe    string        `gorm:"column:describe;NOT NULL" json:"describe"`
}

// TableName sets the insert table name for this struct type
func (s *Service) TableName() string {
	return "services"
}
